From: Alessandro Bono Date: Thu, 14 Jul 2022 13:37:42 +0000 (+0200) Subject: extensionSystem: Check if mode is supported when loading X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~461^2^2~228 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d01d38e1e903819312b18b5b57c7f1504f8c6632;p=gnome-shell.git extensionSystem: Check if mode is supported when loading Don't try to initialize and then enable an extension if it is not supported in the current mode. Otherwise the extension will not be initialized, and the initial ERROR state is not cleared. Once it is in ERROR state we can't enable it anymore when we switch mode. Instead, leave the extension in INITIALIZED state, so that it will be initialized when appropriate. This happens for extensions that support the unlock-dialog mode but not the user mode. Part-of: --- diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js index ca96a99f4..c21cc7cde 100644 --- a/js/ui/extensionSystem.js +++ b/js/ui/extensionSystem.js @@ -376,7 +376,8 @@ var ExtensionManager = class extends Signals.EventEmitter { this.logExtensionError(extension.uuid, new Error( 'A different version was loaded previously. You need to log out for changes to take effect.')); } else { - let enabled = this._enabledExtensions.includes(extension.uuid); + let enabled = this._enabledExtensions.includes(extension.uuid) && + this._extensionSupportsSessionMode(extension.uuid); if (enabled) { if (!this._callExtensionInit(extension.uuid)) return;